<template>
  <div class="header">
    <span class="title">{{title}}</span>
    <span class="date">{{parseTime(date)}}</span>
  </div>
</template>

<script>
import { parseTime } from '../../util/time'

export default {
  props: {
    title: String,
    date: String
  },
  methods: {
    parseTime (time) {
      return parseTime(time, '{y}-{m}-{d}')
    }
  }
}
</script>

<style scoped lang="stylus">
  .header
    height 50px
    display flex
    align-items center
    justify-content space-between
    .title
      dpr-font(16px)
      color:rgba(26,26,48,1);
    .date
      dpr-font(12px)
      color:rgba(85,84,93,1);
</style>
